package com.aiju.cash.ui.main.view;

import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.aiju.cash.R;
import com.aiju.cash.ui.multiple_shops.widget.MenuLinearLayout;

/**
 * 作者：流冥 on 2017/6/15 10:44
 * 说明：
 */

public class BollterSelectbottomView extends LinearLayout {
    private TextView money;
    private TextView des;

    public BollterSelectbottomView(Context context) {
        super(context);
        initView(context);
    }

    public BollterSelectbottomView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        initView(context);
    }

    public BollterSelectbottomView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initView(context);
    }

    void initView(Context context) {
        setGravity(Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL);
        RelativeLayout view = (RelativeLayout) LayoutInflater.from(context).inflate(R.layout.layout_bollter_select_bottom_view, null);
        LayoutParams layoutParams = new LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, MenuLinearLayout.dip2px(context, 30));
        view.setLayoutParams(layoutParams);

        money = (TextView) view.findViewById(R.id.money);
        des = (TextView) view.findViewById(R.id.des);
        addView(view);
    }

    public void setData(String m, String d) {
        money.setText(m);
        des.setText(d);

    }


}
